$(function(){
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#createDate' //指定元素
        });
    });
});

/**
 * 添加商品
 */
function addProduct() {
    $.post("/product/add",$("#productForm").serialize(),function (info) {
        if(info == 'ok'){
            location.href = "main.html";
        }
    });
}